<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .box {
            width: 1200px;
            height: 200px;
            margin: 0 auto;
            position: relative;
        }
        
        .box ul {
            list-style: none;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        
        .box ul li {
            width: 107px;
            height: 107px;
            float: left;
            margin-right: 20px;
            position: relative;
        }
        
        .box ul li::before {
            content: "";
            display: block;
            width: 107px;
            height: 107px;
            transform: rotate(0);
            transition: transform 2s linear 0s;
        }
        
        .box ul li:nth-child(1)::before {
            background-image: url(D:/BaiduNetdiskDownload/前端体系/images/a_1.png);
        }
        
        .box ul li:nth-child(2)::before {
            background-image: url(D:/BaiduNetdiskDownload/前端体系/images/a_2.png);
        }
        
        .box ul li:nth-child(3)::before {
            background-image: url(D:/BaiduNetdiskDownload/前端体系/images/a_3.png);
        }
        
        .box ul li:nth-child(4)::before {
            background-image: url(D:/BaiduNetdiskDownload/前端体系/images/a_4.png);
        }
        
        .box ul li img {
            position: absolute;
            width: 60px;
            height: 60px;
            left: 50%;
            top: 50%;
            margin-left: -30px;
            margin-top: -30px;
            /* transform: translate(-50%, -50%); */
            /* transition: transform 1s ease 0s; */
        }
        
        .box ul li:hover::before {
            transform: rotate(360deg);
        }
        
        .box ul li:hover img {
            transform: scale(1.1);
        }
        
        * {
            margin: 0;
            padding: 0;
        }
        
        .father {
            display: flex;
            min-height: 100vh;
            background: pink;
        }
        
        .son {
            margin: auto;
            background: red;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son">子元素的内容，想水平垂直居中</div>
        <div class="son2">这个元素不想水平垂直居中</div>
    </div>
    <div class="box">
        <ul>
            <li>
                <img src="D:/BaiduNetdiskDownload/前端体系/images/icon1.svg" alt="" />
            </li>
            <li>
                <img src="D:/BaiduNetdiskDownload/前端体系/images/icon2.svg" alt="" />
            </li>
            <li>
                <img src="D:/BaiduNetdiskDownload/前端体系/images/icon3.svg" alt="" />
            </li>
            <li>
                <img src="D:/BaiduNetdiskDownload/前端体系/images/icon4.svg" alt="" />
            </li>
        </ul>
    </div>
</body>

</html>